/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.server.util;

import com.server.model.Login;
import java.util.ArrayList;

/**
 *
 * @author michel.oh
 */
public class LoginsSingleton {
    private static LoginsSingleton instance;
    //private ArrayList<Login> listaLogins;
    int cont_usuarios_logados;
    
    private LoginsSingleton()
    {
        this.cont_usuarios_logados = 0;
    }
    
    public static LoginsSingleton getInstance()
    {
        if(instance==null)
        {
            instance = new LoginsSingleton();
        }
        return instance;
    }
    
//    public boolean existsUser(Login login)
  //  {
    //    return listaLogins.contains(login);
    //}
    
    public boolean addUser()
    {
       this.cont_usuarios_logados++;
       return true;
    }
    
    public boolean removeUser()
    {
        this.cont_usuarios_logados--;
        return true;
    }
    
    public int getQuantidade()
    {
        return cont_usuarios_logados;
    }
}
